var UserPopup=	{
ShowMenu:function(Menu)
	{
	Menu.MenuId='userPopup';
	Menu.Type=Menu.Type||'Top';
//	Menu.Left=Menu.Left||-180;
	if(UserPopup.Menu!=Menu)	UserPopup.CheckMenu(Menu);
	},
CheckMenu:function(Menu)
	{
	var CurrentUser=fastCSharp.PageView.SkinValue.SkinValue.currentUser,SkinView=(this.Menu=Menu).SkinView;
	Menu.CheckMenuParameter();
	Menu.IsShow=0;
	SkinView[Menu.ShowViewFunctionName='IsShow']=this.NoShowView;
	fastCSharp.$Id('userPopup').Display(0);
	if(CurrentUser)
		{
		if(this.Interval)
			{
			clearTimeout(this.Interval);
			this.Interval=0;
			}
		if(SkinView.UserId&&SkinView.UserId!=CurrentUser.Id)
			{
			var User=diantou.user.Get(SkinView.UserId,1);
			if(!User.IsUserPopup||User.IsUserPopup==2)	this.Interval=setTimeout(fastCSharp.ThisFunction(this,this.GetUser,[Menu]),500);
			}
		}
	},
NoShowView:function()	{	return 0;	},
SetView:function()
	{
	var SkinView=this.Menu.SkinView;
	SkinView.userRelation=diantou.userRelation.Get(SkinView.UserId,1);
	SkinView.userRelation.User=diantou.user.Get(SkinView.UserId,1);
	this.Menu.IsShow=1;
	this.Menu.ShowViewFunctionName=this.Menu.ShowView=null;
	},
ShowView:function()
	{
	this.SetView();
	this.Menu.Show();
	},
GetUser:function(Menu)
	{
	if(Menu==this.Menu&&Menu.IsOver)
		{
		var SkinView=Menu.SkinView,User=diantou.user.Get(SkinView.UserId,1);
		if(User.IsUserPopup)
			{
			if(User.IsUserPopup==2)	this.ShowView();
			}
		else	{
			User.IsUserPopup=1;
			LoadAjax.Get(fastCSharp.ThisFunction(this,this.OnGetUser,[Menu]),'/include/userPopup.html',{userId:Menu.SkinView.UserId});
			}
		}
	},
OnGetUser:function(Value,Menu)
	{
	if(Value&&Value.userRelation.User)
		{
		var SkinView=Menu.SkinView,User=diantou.user.Get(SkinView.UserId,1);
		User.IsUserPopup=2;
		if(Menu==this.Menu&&Menu.IsOver)	this.ShowView();
		}
	},
SetRelation:function(Id,Type)
	{
	LoadAjax.Post(fastCSharp.ThisFunction(this,this.OnSetRelation,[Id]),'setFocus.user.SetRelation',{value:{FocusId:Id,Type:Type}});
	},
OnSetRelation:function(Value,Id)
	{
	if(Value.__AJAXRETURN__>=0)
		{
		var UserRelation=diantou.userRelation.Get(Id,1);
		UserRelation.RelationMap=Value.__AJAXRETURN__;
		if(this.Menu.SkinView.UserId==Id)	this.ShowView();
		}
	}
		};